package com.scalar.chiptrack.adaptor;

import java.util.ArrayList;

import com.scalar.chiptrack.utils.StringUtils;


/**
 * @author  ChandraSekhar
 * @version 1.0
 * 
 * @changed by Mallik Ankati
 * @date 12/26/2004
 * Added extra member variables
 * 
 */
public class Adaptor {

    private String adaptorName      = null;
    private String adaptorRunTime   = null;
    private String vendorName       = null;
	private ArrayList adaptorList   = null;
    private String  processType     = null;
    private String emailID          = null;
    private String notificationName = null;
    private String fileName         = null;
    private String uploadDate       = null;

    private String transactionCode = null;
	private String customerPart    = null;
	private String waferLot        = null;
	private int waferNo;
    private int dieQty;
    private String transactionTime = null;
	private String lotStatus       = null;
    private String waferMapName   = null;
	private String systemTime      = null;
	private String shipFromPlant  = null;
	private String shipLocation    = null;
	private String assemblyLot     = null;
	private int lotDieQty;
	private String bachingLot      = null;
	private String dateCode        = null;
	
    public String getAdaptorName()
    {
        return adaptorName;
    }
    public void setAdaptorName( String adaptorName )
    {
        this.adaptorName = adaptorName;
    }
    public String getAdaptorRunTime()
    {
        return adaptorRunTime;
    }
    public void setAdaptorRunTime( String adaptorRunTime )
    {
        if ( adaptorRunTime != null )
        {
            adaptorRunTime = StringUtils.formatDateandTime( adaptorRunTime );
        }

        this.adaptorRunTime = adaptorRunTime;
    }   
    public String getVendorName(){
    	return vendorName;
    }
    public void setVendorName(String vendorName){
    	this.vendorName = vendorName;
    }
    public ArrayList getAdaptorList(){
    	return adaptorList;
    }
    public void setAdaptorList(ArrayList adaptorList){
    	this.adaptorList = adaptorList;
    }

    public String getProcessType() {
        return processType;
    }

    public void setProcessType(String processType) {
        this.processType = processType;
    }

    public String getEmailID() {
        return emailID;
    }

    public void setEmailID(String emailID) {
        this.emailID = emailID;
    }

    public String getNotificationName() {
        return notificationName;
    }

    public void setNotificationName(String notificationName) {
        this.notificationName = notificationName;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getUploadDate()
    {
        return uploadDate;
    }

    public void setUploadDate(String uploadDate)
    {                           
        this.uploadDate = uploadDate;
    }

    public String getTransactionCode() {
        return transactionCode;
    }

    public void setTransactionCode(String transactionCode) {
        this.transactionCode = transactionCode;
    }

    public String getCustomerPart() {
        return customerPart;
    }

    public void setCustomerPart(String customerPart) {
        this.customerPart = customerPart;
    }

    public String getWaferLot() {
        return waferLot;
    }

    public void setWaferLot(String waferLot) {
        this.waferLot = waferLot;
    }

    public int getWaferNo() {
        return waferNo;
    }

    public void setWaferNo(int waferNo) {
        this.waferNo = waferNo;
    }

    public int getDieQty() {
        return dieQty;
    }

    public void setDieQty(int dieQty) {
        this.dieQty = dieQty;
    }

    public String getTransactionTime() {
        return transactionTime;
    }

    public void setTransactionTime(String transactionTime) {
        this.transactionTime = transactionTime;
    }

    public String getLotStatus() {
        return lotStatus;
    }

    public void setLotStatus(String lotStatus) {
        this.lotStatus = lotStatus;
    }

    public String getWaferMapName() {
        return waferMapName;
    }

    public void setWaferMapName(String waferMapName) {
        this.waferMapName = waferMapName;
    }

    public String getSystemTime() {
        return systemTime;
    }

    public void setSystemTime(String systemTime) {
        this.systemTime = systemTime;
    }

    public String getShipFromPlant() {
        return shipFromPlant;
    }

    public void setShipFromPlant(String shipFromPlant) {
        this.shipFromPlant = shipFromPlant;
    }

    public String getShipLocation() {
        return shipLocation;
    }

    public void setShipLocation(String shipLocation) {
        this.shipLocation = shipLocation;
    }

    public String getAssemblyLot() {
        return assemblyLot;
    }

    public void setAssemblyLot(String assemblyLot) {
        this.assemblyLot = assemblyLot;
    }

    public int getLotDieQty() {
        return lotDieQty;
    }

    public void setLotDieQty(int lotDieQty) {
        this.lotDieQty = lotDieQty;
    }

    public String getBachingLot() {
        return bachingLot;
    }

    public void setBachingLot(String bachingLot) {
        this.bachingLot = bachingLot;
    }

    public String getDateCode() {
        return dateCode;
    }

    public void setDateCode(String dateCode) {
        this.dateCode = dateCode;
    }

    public String toString()
    {
        StringBuffer sb = new StringBuffer();
        
        sb.append( " adaptorName = " + adaptorName + "\n");
        sb.append( " adaptorRunTime = " + adaptorRunTime + "\n");
        sb.append( " vendorName = " + vendorName + "\n");
        sb.append( " processType = " + processType + "\n");
        sb.append( " notificationName = " + notificationName + "\n");
        sb.append( " emailID = " + emailID + "\n");
        sb.append( " fileName = " + fileName + "\n");

        if( adaptorList != null && adaptorList.size() > 0 )
        {
            for( int i = 0; i < adaptorList.size(); i++ )
            {
                AdaptorList alist = ( AdaptorList ) adaptorList.get( i );
                sb.append( "   Adaotor Name     " + alist.getAdaptorClassName() + "\n");
                sb.append( "   Parser Name     " + alist.getParserClassName() + "\n");
            }
        }

        return sb.toString();
    }
}
